home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
116
< prev
next >
Wrap
Text File
|
1996-08-06
|
899b
|
44 lines
Path: unix.sri.com!usenet
From: mklenk@updike.sri.com (Mark Klenk)
Newsgroups: comp.std.c
Subject: ... char * * promotion to char const * const * ...
Date: 16 Jan 1996 16:20:42 GMT
Organization: Nuance Communications
Message-ID: <4dgj8q$qin@unix.sri.com>
Reply-To: mklenk@updike.sri.com
NNTP-Posting-Host: 204.75.161.40
My question is this:
Why does a char * * not naturally promote to a
char const * const *?
The following is legal and generates no compiler
warning:
char const * foo;
char * bar;
foo = bar;
// bar = foo; // Not allowed without cast.
But why not this:
char const * const * foo_array;
char * * bar_array;
foo_array = bar_array;
On every compiler I've tried, I get a warning about this,
something like "assignment from incompatible pointer type."
Can anyone clear this up for me?
---
mklenk@coronacorp.com (Mark Klenk)